﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Collections.ObjectModel;

namespace HeritageAcademy.Models.DataModels
{
    /// <remarks/>
    [SerializableAttribute]
    [DesignerCategoryAttribute(@"code")]
    [XmlTypeAttribute(AnonymousType = true)]
    [XmlRootAttribute(Namespace = "", IsNullable = false)]
    public class TestResults
    {
        private ObservableCollection<TestResult> items = new ObservableCollection<TestResult>();

        /// <remarks/>
        [XmlElementAttribute("TestResult", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public ObservableCollection<TestResult> Results
        {
            get { return items; }
            set { items = value; }
        }
    }

    /// <remarks/>
    [SerializableAttribute]
    [DesignerCategoryAttribute(@"code")]
    [XmlTypeAttribute(AnonymousType = true)]
    public class TestResult
    {
        private ObservableCollection<PageResult> pageResult = new ObservableCollection<PageResult>();
        private string id;

        /// <remarks/>
        [XmlElementAttribute("PageResult", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public ObservableCollection<PageResult> Pages
        {
            get { return pageResult; }
            set { pageResult = value; }
        }

        /// <remarks/>
        [XmlAttributeAttribute]
        public string Id
        { 
            get { return id; }
            set { id = value; }
        }
    }

    /// <remarks/>
    [SerializableAttribute]
    [DesignerCategoryAttribute(@"code")]
    [XmlTypeAttribute(AnonymousType = true)]
    public class PageResult
    {
        private ObservableCollection<Answer> answer = new ObservableCollection<Answer>();
        private string id;
        private string time;

        /// <remarks/>
        [XmlElementAttribute("Answer", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public ObservableCollection<Answer> Answers
        {
            get { return answer; }
            set { answer = value; }
        }

        /// <remarks/>
        [XmlAttributeAttribute]
        public string Id
        {
            get { return id; }
            set { id = value; }
        }

        /// <remarks/>
        [XmlAttributeAttribute]
        public string Time
        {
            get { return time; }
            set { time = value; }
        }
    }

    /// <remarks/>
    [SerializableAttribute]
    [DesignerCategoryAttribute(@"code")]
    [XmlTypeAttribute(AnonymousType = true)]
    public class Answer
    {
        private string id;
        private string status;

        /// <remarks/>
        [XmlAttributeAttribute]
        public string Id
        {
            get { return id; }
            set { id = value; }
        }

        /// <remarks/>
        [XmlAttributeAttribute]
        public string Status
        {
            get { return status; }
            set { status = value; }
        }
    }
}
